home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d17
/
slash0.arc
/
SLASH0.BAS
< prev
next >
Wrap
BASIC Source File
|
1990-01-20
|
5KB
|
92 lines
1 REM SLASH0.BAS by E.C. Weber Copyright 1989 All Rights Reserved
2 REM For a visually better program, any line that reads
3 REM REM CLEAR SCREEN CODE CLS
4 REM should be replaced by the appropriate code to clear the screen.
5 REM Since this code in MSDOS and TRSDOS BASIC is CLS, simply delete
6 REM the first four words leaving the CLS.
7 REM For AppleSoft BASIC, convert the LPRINTS to the appropriate commands.
8 REM To test the program, temporarily remove the REM in line 530
100 REM **************** Get Style, Size, Normal/Compressed ***********
110 REM Clear Screen Code CLS
130 FOR X=1 TO 35:PRINT "=-";:NEXT X:PRINT "="
140 PRINT"SLASH0.BAS by E.C. Weber c1989"
150 FOR X=1 TO 35:PRINT "=-";:NEXT X:PRINT "=":PRINT
160 PRINT"Answer the following questions by pressing the key corresponding to"
170 PRINT "the letter in angle brackets."
180 PRINT
190 PRINT "Which Font? <R>oman <S>ans Serif <D>raft "
200 FONT$ = INKEY$: IF FONT$="" THEN 200
210 IF FONT$<>"R" AND FONT$<>"r" AND FONT$<>"S" AND FONT$<>"s" AND FONT$<>"D" AND FONT$<>"d" THEN PRINT "illegal response - do again ":GOTO 200
220 PRINT
230 PRINT "Which Pitch? <1> 10 CPI <2> 12 CPI";
240 IF FONT$<>"D" AND FONT$<>"d" THEN PRINT " <3> PS" ELSE PRINT
250 PITCH$=INKEY$:IF PITCH$="" THEN 250
270 REM **** lines 300, 310, 320 check the validity of the pitch input *****
280 REM **** there is no draft ps, so pitch$="3" would not be valid ******
290 REM **** if these lines cause trouble in your BASIC, remove them ******
300 TEST1%=((FONT$="D") OR (FONT$="d"))+((PITCH$<>"1") AND (PITCH$<>"2"))
310 TEST2%=(PITCH$<>"1")+(PITCH$<>"2")+(PITCH$<>"3")
320 IF TEST1% =-2 OR TEST2%=-3 THEN PRINT "illegal response - do again":GOTO 250
330 PRINT
340 PRINT"<N>ormal or <C>ompressed? "
350 SIZE$=INKEY$:IF SIZE$="" THEN 350
360 IF SIZE$<>"N" AND SIZE$<>"n" AND SIZE$<>"C" AND SIZE$<>"c" THEN PRINT "illegal response - do again ":GOTO 350
370 PRINT:LINE INPUT"Enter a number to set the left margin (default=10): ";MARGIN$
380 IF MARGIN$="" THEN MARGIN$="10"
390 MARGIN%=VAL(MARGIN$)
400 IF MARGIN%>79 THEN PRINT"illegal value":GOTO 370
410 LPRINT CHR$(27)"@";
420 LPRINT CHR$(27);CHR$(108);CHR$(MARGIN%);: REM set left margin
430 PRINT:PRINT "Downloading.....";
440 IF PITCH$="1" THEN LPRINT CHR$(27);"P";:PRINT"10 CPI";
450 IF PITCH$="2" THEN LPRINT CHR$(27);"M";:PRINT"12 CPI";
460 IF PITCH$="3" THEN LPRINT CHR$(27);CHR$(112);CHR$(1);:PRINT"PS";
470 IF FONT$="D" OR FONT$="d" THEN GOSUB 1000
480 IF FONT$="S" OR FONT$="s" THEN GOSUB 2000
490 IF FONT$="R" OR FONT$="r" THEN GOSUB 3000
500 IF SIZE$="N" OR SIZE$="n" THEN LPRINT CHR$(16);:PRINT" Normal";
510 IF SIZE$="C" OR SIZE$="c" THEN LPRINT CHR$(15);:PRINT" Condensed";
520 LPRINT CHR$(27)"%"CHR$(1);
530 REM LPRINT "12345678900000000"
540 PRINT" Slashed Zero"
550 END
1000 REM ********************* DRAFT ******************
1010 PRINT" Draft";
1020 LPRINT CHR$(27);"x0";
1030 LPRINT CHR$(27);":";CHR$(0);CHR$(0);CHR$(0);: REM load rom into ram
1040 LPRINT CHR$(27);"&";CHR$(0);"00"; :REM state characters to be downloaded
1050 LPRINT CHR$(1);CHR$(9);CHR$(2); :REM number of bytes to be downloaded
1060 REM RESTORE 1100 see line 4030
1070 FOR X% = 1 TO 27
1080 READ BYTE%:LPRINT CHR$(BYTE%);
1090 NEXT X%
1100 DATA 1,253,0,6,2,192,8,4,32,16,8,16,8,16,32,16,32,16,8,64,32,6,128,192,1,127,0
1110 RETURN
2000 REM ***********************SANS SERIF *****************
2010 PRINT" Sans Serif";
2020 LPRINT CHR$(27);"x";CHR$(1);
2030 LPRINT CHR$(27);"k";CHR$(1);
2040 LPRINT CHR$(27);":";CHR$(0);CHR$(1);CHR$(0);
2050 GOSUB 4000
2060 RETURN
3000 REM ***********************ROMAN *****************
3010 PRINT" Roman";
3020 LPRINT CHR$(27);"x1";
3030 LPRINT CHR$(27);"k0";
3040 LPRINT CHR$(27);":";CHR$(0);CHR$(0);CHR$(0);
3050 GOSUB 4000
3060 RETURN
4000 REM **************** LQ Character Definition ***************
4010 LPRINT CHR$(27);"&";CHR$(0);"00";
4020 LPRINT CHR$(3);CHR$(23);CHR$(3);
4030 REM line 4050 sends the data for the draft character to the bit bucket
4040 REM if your BASIC supports it, change line 4050 to RESTORE 4090
4050 FOR X%=1 TO 27:READ NOTNEEDED%:NEXT X%
4060 FOR X%=1 TO 69
4070 READ BYTE%:LPRINT CHR$(BYTE%);
4080 NEXT X%
4090 DATA 1,255,0,2,0,128,5,255,64,10,0,160,4,3,64,24,0,48,0,6,0,16,0,16,32,12
4100 DATA 8,16,0,16,32,24,8,16,0,16,32,48,8,16,0,16,32,96,8,16,0,16,0,192,0
4110 DATA 24,0,48,5,128,64,10,0,160,5,255,64,2,0,128,1,255,0
4120 RETURN